home *** CD-ROM | disk | FTP | other *** search
Wrap
<html> <head> <title>Manage CounterWatch Monitoring</title> <link rel="stylesheet" type="text/css" href="css/rpmstyle.css"> <style> .EventLog { border-style : solid; border-width : 3px; overflow : scroll; background-color:white } .EventLog { border-top-color : graytext; border-left-color : graytext; border-bottom-color : white; border-right-color : white} .VAMainBox { border: none; background-color : activeborder } </style> </head> <body class="bodyc" scroll="no" style="margin:3px; overflow: none"language="JavaScript" RPMHostIP="!BreakoutBot:MonitorIP!" RPMHostPort="!BreakoutBot:MonitorPort!" RPMUserName="!BreakoutBot:UserName!" BOBDone="!BreakoutBot:Done!" onload="top.banner.savePageCoord(event,document.body,'ServerWatch'); InitRpmCC_VA();" onbeforeunload="DiscoRpmCC_VA()" onresize="processSizeChange()" onclick="checkClick()" onkeydown="processBSP()"> <script LANGUAGE="JavaScript"> <!-- //.VAMainBox { border-top-color : #E8E8E8; border-left-color : #E8E8E8; border-bottom-color : #555555; border-right-color : #555555 } var bdH = 0; var byM = null; var borderSz = 2; // Thin Bord is 2pixels var PuPW = "500px", PuPWu=500, PuPH = "250px",PuPHu=250; var PopUH = 0; var PopUL = 0; var Tid = null, CTid= null, EMCTid = null; var ELogWinInit = ""; // save for ElogWin init HTML var ELBgFlg = 0; // Log Background color toggle var TitleTop = ButtonTop = 0; var TitleLeft = ButtonLeft = 0; var Hp = null; // Host port var ReconnectEvent = false; var NumberOfMCR = 0; var CurComputerID = null; var EMCmode = 0; // get Enum Monitored Counters mode;0=instance, 1=non-instance var EMCstatus = 0; // get EMC status var EMCcix = 0; // Computer Index var EMCcntix = 0; // Current Computer Counter Index var ELChkBoxCount = 0; // unchecked counter count var ComputerObjectArray = new Array(); var ImageObjectArray = new Array(); var CounterObjectArray = new Array(); var CheckObjectArray = new Array(); var GMCix = 0; // CounterObjectArray index var NewComputerCount = 0; // total count of computers in display // Capture and ignore script errors window.onerror = wwScrErr; function wwScrErr() { return true; } /* On Load tell the Comm control to Connect to the Server */ function InitRpmCC_VA() { top.MainLoaded = true; // Flag that Main is now loaded top.banner.savePageCoord(event,document.body,"ReviewActiveCounters"); byM = 2*parseFloat(document.body.style.margin); top.main.restore(); // insure Tree pane is visible processSizeChange(); /* Connect to Server */ Hp = parseInt(document.body.RPMHostPort,10); RpmCC_VA.Connect(document.body.RPMHostIP,Hp, ""); } function processReconnect() { Tid = null; if ( RpmCC_VA.IsConnected() ) { Tid = setTimeout("processConnectionCheck()",30000); // Delay 30 secs then check connection return; } RpmCC_VA.Connect(document.body.RPMHostIP,Hp, ""); } function processConnectConfirmed() { // Restore Filter and Computer Store if ( ReconnectEvent == false ) { processLogWindow(); // initialize Log Window ReconnectEvent = true; } top.Rstatus.Pstat("Connected"); processRefreshButton(); if ( Tid != null ) { clearTimeout(Tid); // stop timeout routine } Tid = setTimeout("processConnectionCheck()",30000); // Delay 30 secs then check connection } function processConnectionCheck() { Tid = null; RpmCC_VA.SendKeepAlive("Check"); Tid = setTimeout("processConnectionCheck()",30000); // Delay 30 secs then check connection } /* On Unload tell the Comm control to Disconnect from the Server */ function DiscoRpmCC_VA() { top.BannerMenuShow(); RpmCC_VA.Disconnect(); top.banner.processStopCommX(); if ( Tid != null ) { clearTimeout(Tid); // stop timeout routine } } var SCbsy = false; function processSizeChange() { if ( SCbsy ) return; SCbsy = true; // Display Height and Width bCh = document.body.clientHeight; bCw = document.body.clientWidth; if ( top.main.IsTreeVisible() ) { top.main.VCcw = bCw; } // Minimums bCh = (bCh < bdH+byM+PuPHu+20) ? bdH+byM+PuPHu+20 : bCh; bCw = (bCw < PuPWu+10) ? PuPWu+10 : bCw; document.body.scroll = (bCw <= PuPWu+10 || bCh <= bdH+byM+PuPHu+20) ? "yes" : "no"; // Set Height/Widths for Main window area VA_MainBox.style.height = bCh-(bdH+byM-borderSz)-10; VA_MainBox.style.width = bCw-byM-4; VA_MainBox.style.display = ""; TitleTop = "24px"; TitleLeft = PopUL+145; //PopUpContext Menu PopUpContextSize(bCw); // Set Height/Widths for Log areas ELogWin.style.height = bCh-(bdH+byM-borderSz)-TitleDivSize; ELogWin.style.width = bCw-byM-10; SCbsy = false; } /* Initialize the Log and Filter Windows */ function processLogWindow() { /* Format Output to Log Window */ FOps = "<table border='0' cellpadding='1' cellSpacing='1' width='100%'><tr>"; FOps += "<td width='38%' align='center' style='background-color:activeborder' class='optextb'>"; FOps += "Server/Device Name" + "</td>"; FOps += "<td width='38%' align='center' style='background-color:activeborder' class='optextb'>"; FOps += "Group Name" + "</td>"; FOps += "<td width='24%' align='center' style='background-color:activeborder' class='optextb'>"; FOps += "OS" + "</td>"; FOps += "</tr></table>"; /* FOps += "<table border='0' cellpadding='1' cellSpacing='1' width='100%'><tr>"; FOps += "<td width='5%' align='center' style='background-color:white' class='optextb'>"; FOps += "</td>"; FOps += "<td width='49%' align='center' style='background-color:activeborder' class='optextb'>"; FOps += "Counter Name" + "</td>"; FOps += "<td width='46%' align='center' style='background-color:activeborder' class='optextb'>"; FOps += "Object Name" + "</td>"; FOps += "</tr></table>"; */ ELogWin.insertAdjacentHTML("afterBegin",FOps); ELogWinInit = ELogWin.innerHTML; // save for Refresh WarningBox.style.display = ""; } function processMonitoredCounterRecord(dStrg) { var warr = new Array(), carr = new Array(), CPo = null, CNo = null; warr = dStrg.split("~"); // parse the Monitored Counter string if ( EMCmode == 0 && warr[10] == "NONE!" || //ignore if looking for instance counters EMCmode == 1 && warr[10] != "NONE!" ) { // or looking for non-instance counters return; } // If non-instanced, check for duplicates with instanced if ( EMCmode == 1 && NewComputerCount != 0) { // Look for existing Computer for ( var i=1; i<=NewComputerCount; i++ ) { CPo = ComputerObjectArray[i]; // Computer Entry object if ( warr[2] == CPo.cid ) // if match break; } if ( i <= NewComputerCount ) { // if computer exists, see if already an instanced counter carr = CPo.cntrix.split("~"); // get index to counter entries in object array for ( var j=1; j<=CPo.ccnt; j++ ) { CNo = CounterObjectArray[ carr[j] ]; if ( warr[8] == CNo.cntrnme ) // if match on counter, then duplicate return; // ignore } CurComputerID = warr[2]; // set to this computer EMCcix = i; EMCcntrix = j-1; // next available counter index for this computer } else { EMCcix = NewComputerCount; // set index } } //StatusPrintButton.className = "BoxButton"; // disable button StatusPrintButton.disabled = ""; // disable button // Process new Computer Entry if necessary FOps = ""; var newCE = false; // flag no new computer entry if ( warr[2] != CurComputerID ) { // if new Computer entry ++EMCcix; // bump current computer index newCE = true; // new computer entry FOps = '<div style="margin:0; padding:0" id="ComputerLogLine'+EMCcix; FOps += '" onclick="processComputerClick(this)" cstate="C" ccnt=1 cntrix="" cid="'+warr[2]+'">'; FOps += '<table border="0" cellpadding="0" cellSpacing="1" width="100%"><tr>'; FOps += '<td width="3%" align="center" style="cursor:hand;background-color:e8e8e8"'; FOps += ' title="Click to show/hide associated Counters and Objects">'; FOps += '<img id="CLLI'+EMCcix+'" src="images/Plus.gif" align="middle" height="11" width="11"></td>'; FOps += '<td width="35%" align="left" style="cursor:hand;background-color:e8e8e8" title="'; FOps += warr[4]+'" class="optext">'; FOps += warr[3] + '</td>'; FOps += '<td width="38%" align="left" style="cursor:hand;background-color:e8e8e8" title="'; FOps += warr[1]+'" class="optext">' + warr[0] + '</td>'; FOps += '<td width="24%" align="left" style="cursor:hand;background-color:e8e8e8" title="'; FOps += warr[5]+'" class="optext">'; osix = warr[5].indexOf("Windows"); FOps += warr[5].substring(osix+8) + '</td>'; FOps += '</tr></table></div>'; CurComputerID = warr[2]; EMCcntrix = 0; // reset counter index ++NewComputerCount; // total number of computers in display } // Process new Counter Entry ++EMCcntrix; // bump Counter count FOps += '<div style="margin:0; padding:0" id="CounterLogLine'+EMCcix+'_'+EMCcntrix+'" cntrnme="' FOps += warr[8]+'" style="background-color:white; display:none" mcids="' + warr[12] + '">'; FOps += '<table border="0" cellpadding="0" cellSpacing="1" width="100%"><tr>'; FOps += '<td width="4%" align="left" class="optext"></td>'; FOps += "<td width='4%' align='right' class='optext'>"; FOps += "<input style='cursor:hand' onclick='processCheckClick()' id='CB" + EMCcix +'_'+ EMCcntrix; FOps += "' type='checkbox' title='Click to check/uncheck to enable/disable monitoring, respectively' CHECKED></td>"; FOps += '<td width="46%" align="left" style="cursor:hand" title="'+warr[9]; FOps += '" class="optext">' + warr[8] + '</td>'; FOps += '<td width="46%" align="left" style="cursor:handp" title="'; FOps += warr[7]+'" class="optext">' + warr[6]; // If an instanced name, append it if ( warr[10] != 'NONE!' ) { FOps += '_'+warr[10]; } FOps += '</td></tr></table>'; // Update Counter count in associated Computer entry if ( EMCcntrix > 1 ) { // First one already defined ComputerObjectArray[EMCcix].ccnt = EMCcntrix; } // Either Append new [Computer]/Counter entry, or insert non-instanced Counter entry if ( CNo == null ) { ELogText.insertAdjacentHTML('beforeEnd',FOps); } else{ CNo.insertAdjacentHTML('afterEnd',FOps); } // Save Counter Object and Computer Object in respective arrays if ( newCE ) { // if new compter entry, save in Array ComputerObjectArray[EMCcix] = document.all['ComputerLogLine'+EMCcix]; ImageObjectArray[EMCcix] = document.all['CLLI'+EMCcix]; } CounterObjectArray[++GMCix] = document.all['CounterLogLine'+EMCcix+'_'+EMCcntrix]; CheckObjectArray[GMCix] = document.all['CB'+EMCcix+'_'+EMCcntrix]; ComputerObjectArray[EMCcix].cntrix += "~"+GMCix; } /* Process Refresh button click */ function processRefreshButton() { top.banner.processStartComm(); ELogWin.innerHTML = ELogWinInit; // clear log ELBgFlg = 0; // reset CurComputerID = null; SetButtonState(RefreshButton,"1"); // disable buttons SetButtonState(ApplyButton,"1"); EMCmode = 0; // get instanced counters first EMCstatus = 0; // reset status EMCcix = 0; // reset Computer index EMCcntix = 0; // Current Computer Counter Index NumberOfMCR = 0; // reset count NewComputerCount = 0; GMCix = 0; // CounterObjectArray index ELChkBoxCount = 0; // unchecked counters count ComputerObjectArray.length = CounterObjectArray.length = 0; ImageObjectArray.length = CheckObjectArray.length = 0; RpmCC_VA.EnumMonitoredCounters(); // get active instanced counters //StatusPrintButton.className = "BoxButtonD"; // disable button StatusPrintButton.disabled = "disabled"; // disable button } /* Process a Counter Check box click */ function processCheckClick() { if ( document.all[event.srcElement.id].checked == "" ) { ++ELChkBoxCount; } else { --ELChkBoxCount; } if ( ELChkBoxCount != 0 ) { SetButtonState(ApplyButton,"0"); } else { SetButtonState(ApplyButton,"1"); } } /* Process Computer Entry Click to expand or contract it */ function processComputerClick(eob) { var warr = new Array(); var llix = eob.id.substring(15); // strip out index var iob = ImageObjectArray[llix]; // get image object var dstate = "none"; // default to display var cob = null; if ( eob.cstate == "C" ) { iob.src = "images/Minus.gif"; eob.cstate = "E"; dstate = ""; } else { iob.src = "images/Plus.gif"; eob.cstate = "C"; } warr = eob.cntrix.split("~"); for ( var j=1; j<=eob.ccnt; j++ ) { cob = CounterObjectArray[ warr[j] ]; cob.style.display = dstate; } iob.scrollIntoView(true); } // Process Unselect Button Click function processUnselectButton() { var carr = new Array(), CPo = null, CNo = null; for ( var i=1; i<=NewComputerCount; i++ ) { // For each Computer entry CPo = ComputerObjectArray[i]; // Computer Entry object if ( CPo.cstate == "C" ) // if contracted, ignore continue; carr = CPo.cntrix.split("~"); // get index to counter entries in object array for ( var j=1; j<=CPo.ccnt; j++ ) { // if entry is checked, uncheck it and count it if ( CheckObjectArray[ carr[j] ].checked != "" ) { CheckObjectArray[ carr[j] ].checked = ""; ++ELChkBoxCount; } } } if ( ELChkBoxCount != 0 ) { SetButtonState(ApplyButton,"0"); } else { SetButtonState(ApplyButton,"1"); } } // Process Apply Button Click function processApplyButton() { var carr = new Array(), CPo = null, CNo = null; for ( var i=1; i<=NewComputerCount; i++ ) { // For each Computer entry CPo = ComputerObjectArray[i]; // Computer Entry object carr = CPo.cntrix.split("~"); // get index to counter entries in object array for ( var j=1; j<=CPo.ccnt; j++ ) { // if entry is unchecked, apply to server if ( CheckObjectArray[ carr[j] ].checked == "" ) { RpmCC_VA.ChangeMonitoredCounter( CounterObjectArray[ carr[j] ].mcids ); } } } processRefreshButton(); // refresh display } // Process Tree Button to hide/show Tree var TreeState = true; function processTreeButton() { if ( !TreeState ) { top.main.restore(); TreeState = true; } else { top.main.expand(); TreeState = false; } } // Process to Toggle the Hide and Show of the Banner & Menu Frames var hideToggle = 0; var TitleDivSize = 115; function processBannerMenu() { if ( hideToggle == 0 ) { top.BannerMenuHide(); hideToggle = 1; ActiveCounterTitleDiv.style.display = "none"; TitleDivSize = 65; } else { top.BannerMenuShow(); hideToggle = 0; ActiveCounterTitleDiv.style.display = ""; TitleDivSize = 115; } } function SetButtonState(BtObj,BState) { //BtObj.className = (BState == "0") ? "BoxButton" : "BoxButtonD"; BtObj.disabled = (BState == "0") ? "" : "disabled"; BtObj.bdis = BState; } function PopUpContextOpen() { } function PopUpContextClose() { } // Print Log var DiscStatWindow = null; function processPrintStatus() { if ( !top.banner.IE55orBetter ) { alert("Print requires IE 5.5/SP1 or greater. Download current, free IE update from Microsoft's web site"); return; } FakeBut.click(); // simulate event to call "savePageCoord(...)" var wprop = "height="+top.banner.bCh+",width="+top.banner.bCw wprop += ",top="+(top.banner.bY-28)+",left="+(top.banner.bX-4)+",scrollbars"; var rName = ""+Math.random(); // use Random number to get unique Window name rName = rName.substring(2,rName.length); DiscStatWindow = window.open("",rName,wprop); if ( DiscStatWindow == null ) { return; } var dh = "<html><head><title>MonitorIT - CounterWatch Monitoring Status Report</title>"; dh += "<link rel='stylesheet' type='text/css' href='css/rpmstyle.css'></head><body"; dh += " title='Exit to Close Window when Printing is complete'>"; var warr = new Array(); warr = ELogWin.innerHTML.split("onclick"); dh += warr.join(""); dh += ' </body></html>'; DiscStatWindow.document.open(); DiscStatWindow.document.write(dh) DiscStatWindow.document.close(); DiscStatWindow.print(); } //--> </script> <script LANGUAGE="JavaScript" src="js/MiscFunc.js"></script> <script LANGUAGE="JavaScript" src="js/SNMPInstances.js"></script> <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="Connected()"> <!-- processConnectConfirmed(); //--> </script> <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="DBChanged(cdata)"> <!-- var warr = new Array(); warr = cdata.split("~"); // parse the event data // ignore if Server Table change or an Alert Table change if ( warr[0] != "1" && warr[0] == "4" ) { top.banner.processDBChangeNotifyEvent(cdata); } //--> </script> <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="Disconnected()"> <!-- top.Rstatus.Pstat("Disconnected",true); if ( Tid != null ) { clearTimeout(Tid); // stop timeout routine } Tid = setTimeout("processReconnect()",10000); // Delay 10 secs then try reconnnect //--> </script> <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="EnumMonitoredCountersRecord(dStrg)"> <!-- WarningBox.style.display = "none"; WarningBox1.style.display = "none"; ++NumberOfMCR; processMonitoredCounterRecord(dStrg); //--> </script> <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="EnumMonitoredCountersDone(dStrg)"> <!-- EMCstatus += ( (dStrg == "Success!" ) ? 0 : 1 ); // save status if ( EMCmode == 0 ) { // if done with instanced counters, get non-instanced EMCmode = 1; RpmCC_VA.EnumMonitoredCountersNoInst(); // get active counters } else { top.banner.processStopCommX(); WarningBox.style.display = "none"; if ( EMCstatus == 0 ) { if ( NumberOfMCR == 0 ) { WarningBox1.style.display = ""; top.Rstatus.Pstat("No Counters Being Monitored",true); } else{ WarningBox1.style.display = "none"; top.Rstatus.Pstat("Done"); } } else { top.Rstatus.Pstat("Error Obtaining Current Active Monitored Counter Records",true); } SetButtonState(RefreshButton,"0"); // enable buttons } function PopUpContextOpen() { } function PopUpContextClose() { } //--> </script> <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="StopCommunication()"> <!-- top.banner.processStopCommX(); //--> </script> <script LANGUAGE="JavaScript" src="js/PopUpMenuFunc.js"></script> <object ID="RpmCC_VA" NAME="RpmCC_VA" WIDTH="14" HEIGHT="1" style="display:none" CLASSID="CLSID:D88C2358-FC83-11D1-BF49-00104B2D6F80" CODEBASE="controls/RPMComm.cab#version=5,2,0,0"> <param name="_Version" value="65536"> <param name="_ExtentX" value="2646"> <param name="_ExtentY" value="1341"> <param name="_StockProps" value="0"> </object> <!-- Define Images used in dynamic HTML generation to force loading and caching now --> <div style="display:none"> <img src="images/Plus.gif"> </div> <!-- Invisible Object to Support Simulated Click Event --> <button id="FakeBut" style="display:none" onclick="top.banner.savePageCoord(event,document.body,'ViewAlerts')"> </button> <select SIZE="1" NAME="AC_ServicesStore" style="display: none"></select> <div id="AC_FilterComp" style="display:none"> <select SIZE="1" NAME="AC_CompStore"></select> <select SIZE="1" NAME="AC_FilterStore"></select> </div> <center> <div id="VA_MainBox" class="VAMainBox" style="display:none"> <div id="ActiveCounterTitleDiv"><table border="1" borderColor="activeborder" align="left"> <tr><td borderColorDark="graytext" borderColorLight="white" style="font-weight:800; font-size:12pt; background-color:threedhighlight; color:windowtext"> <img src="images/sReviewActiveMonitors.gif" align="absmiddle" height="14" width="13"> Manage CounterWatch Monitoring </td></tr> </table> <BR CLEAR=ALL><HR align="left"></div> <center class="inputlabel">Current Counters Being Monitored</center> <div class="EventLog" ID="ELogWin" style="width:98%" align="center"> <center><div style="display:none; width:100%" id="WarningBox" align="center"><table border="0" cellpadding="0" cellspacing="2"> <tr> <td width="43"><img src="images/HourGlass.gif" width="32" height="32" alt="Please Wait!" align="bottom" border="0"></td> <td width="*" style="font-family:Arial; font-size:10pt; font-weight:bold; color:infotext">Please Wait For List of Current Counters Being Monitored!</td> </tr> </table> </div> <div style="display:none; width:100%" id="WarningBox1" align="center"><table border="0" cellpadding="0" cellspacing="2"> <tr> <td width="*" style="font-family:Arial; font-size:10pt; font-weight:bold; color:red">There Are Currently No Counters Being Monitored!</td> </tr> </table> </div></center> <span id="ELogText"></span><select id="LogArray" style="display:none"></select></div> <div style="height:0px; width:100%" align="center"> <table width="100%"><tr><td height="2"></td></tr></table> <table border="1" cellspacing="1" cellpadding="1" width="100%" height="40"> <tr> <td width="20%"><button id="cTreeButton" style="cursor:hand" onclick="processTreeButton()" title="Press to Toggle Tree View" ><img src="images/treehideshow.gif" height="18" width="19"></button></td><td align="center" width ="60%"><button id="UnselButton" style="font-family:arial; font-size : 8pt; font-weight : 600; cursor:hand" title="Unselect All Displayed Counters" style="width:100px; height:27px" onClick="processUnselectButton()" > <img src="images/UnselectAll.gif" align="absmiddle" height="15" width="14">Unselect All</button> <button id="ApplyButton" style="font-family:arial; font-size : 8pt; font-weight : 600; cursor:hand" title="Apply the Unselect Changes" style="width:80px; height:27px" onClick="processApplyButton()" disabled><img src="images/Apply.gif" align="absmiddle" height="16" width="16">Apply</button> <button id="RefreshButton" style="font-family:arial; font-size : 8pt; font-weight : 600; cursor:hand" title="Refresh the Display" style="width:80px; height:27px" onClick="processRefreshButton()"><img src="images/Verify.gif" align="absmiddle" height="15" width="13">Refresh</button> <button id="StatusPrintButton" title="Print CounterWatch Monitoring Status Display" onclick="if (this.bdis == '0') processPrintStatus();" bdis="0" style="width:80px; height:27px" style="font-family:arial; font-size : 8pt; font-weight : 600; cursor:hand" DISABLED><img src="images/Printer.gif" align="absmiddle" height="15" width="17"> Print</button></td><td width="20%" align="right"><button onclick="processBannerMenu()" title="Press to Toggle Hide/Show of Menu and Banner Frames" style="cursor:hand"><img src="images/FullView.gif" align="absmiddle" height="16" width="16"></button></td></tr> </table> </div> </center></div> </center> </body> </html>